Vue.component("category",{
    template:`
<div class="span6">
    <div class="hotProductCategory">

   <dl v-for="c in categorys">
    <dt>
        <a :href="'clist.html?cid='+c.id">{{c.cname}}</a>
    </dt>

    <dd v-for="cs in c.dmCategoryList">
        <a :href="'clist.html?csid='+cs.id">{{ cs.cname }}</a>
    </dd>
    
   </dl>
    </div>
</div>
    `,
    data(){
        return{
            categorys:[]
        }
    },
    created() {
        axios.get("damai-other/dmCategory/queryAll").then(res=> {
            this.categorys = res.data;
        });
    }
});